package com.mpw.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @program:Cloud
 * @author: mpw
 * @Time: 2021/10/31  20:39
 **/
@RestController
public class OrderZK80Controller {


        public static final String INVOKE_URL = "http://cloud-provider-payment";

        @Autowired
        private RestTemplate restTemplate;

        @RequestMapping(value = "/consumer/payment/zk")
        public String paymentInfo()
        {
            String result;
            result = restTemplate.getForObject(INVOKE_URL+"/payment/zk", String.class);
            System.out.println("消费者调用支付服务(zookeeper)--->result:" + result);
            return result;
        }

    }

